import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex)

const store = new Vuex.Store({
  state: {
    list: [
      {id:1, msg: "hehe", finish: true},
      {id:2, msg: "heheda", finish: false},
    ]
  },
  mutations: {
    addList(state, msg) {
      state.list.push({id:(new Date()).getTime(),msg, finish: false})
    }
  }
})

export default store